<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
    </head>
    <body>
        <?php
       
        //opening connection
        $conn = mysql_connect('localhost', 'root', '') or die(mysql_error());
                 mysql_select_db("mydb") or die("could not connect to database".mysql_error());
                 session_start();
        $paper_id= $_GET['paper_id'];
        $conference_id= $_GET['conference_id'];
       $organizer_id=$_SESSION['member_id'];
       
       $query= mysql_query("SELECT `status`
           FROM `paper`p
           WHERE`paper_id`='$paper_id'");
       $myrow=  mysql_fetch_assoc($query);
       $status=$myrow["status"];
       if ($status!="deleted")
       {
       $query2=mysql_query(
               "
                      Update paper 
                      SET `deleted` = 1 
                     Where `paper_id`='$paper_id' AND `conference_id`= '$conference_id'  
                "    
               )or die(mysql_error());
       
       $query4= mysql_query("  
                      Update paper 
                      SET `status` = 'dismissed'
                     Where `paper_id`='$paper_id' AND `conference_id`= '$conference_id'             
")or die (mysql_error());
       echo "This paper is dismissed!" ;  
       }
       else 
       {
           echo "This paper is deleted by author!";
       }
        
        
       mysql_close($conn);
        ?>
    </body>
</html>
